<extend name="Public:innerbase" />
<block name="content">
<div class="container-fluid">
	<div class="page-header wm-page-header">
		<h4>优惠券管理</h4>
		<a class="btn btn-default btn-sm" href="{:U('User/Coupon/index')}">
			<span class="glyphicon glyphicon-chevron-left"></span>&nbsp;返回
		</a>
	</div>
	<div class="alert alert-info">
        本次活动优惠券总数：<span class="redamount">{$datacount}</span>个　　　已领取人数：<span class="redamount">{$recordcount} </span>个　　已领取奖品：<span class="redamount">0</span>个          
	</div>
	<TABLE class="table wm-table-bordered">
		<THEAD>
		<TR style="text-align: center;">
			<TH class="select">序号</TH>
			<TH>优惠券号码</TH>
			<TH>手机号</TH>
			<TH>微信名</TH>
			<TH>优惠名称</TH>
			<TH>获取时间</TH>
			<TH>是否已发优惠券</TH>
			<TH>奖品发送时间</TH>	
			<TH>操作</TH>
		</TR>
		</THEAD>
		<TBODY>
		<volist name="record" id="record">
		 <TR style="line-height:30px;height: 43px;line-height: 59px;">
			<td class="select">{$i}</td>
			<td>{$record.sn}</td>
			<td>{$record.phone}</td>
			<td>{$record.wechat_name}</td>
			<td>{$record.prize}</td>
			<td>{$record.time|date='Y-m-d H:i:s',###}</td>
			<td>
			<if condition="$record['sendstatus'] eq 0">否<else/>是</if>
			</td>
			<td><if condition="$record['sendstatus'] eq 0">--<else/>{$record.sendtime|date='Y-m-d H:i:s',###}</if></td>
			<td>
			<if condition="$record['sendstatus'] eq 0"> 
			<a href="/index.php?m=User&c=Coupon&a=sendprize&id={$record.id}">发奖</a>
			<else/>
			<a href="/index.php?m=User&c=Coupon&a=sendnull&id={$record.id}">取消发奖</a>
			</if>
			</td>
		</TR>
		</volist>
	  </TBODY>
	</TABLE>
</div>
</block>